package io.gitee.devaper.starlight.autoconfigure.interceptor

import org.springframework.core.annotation.AliasFor
import org.springframework.stereotype.Component

/**
 * 将类标记为WebMVC拦截器，同时需要实现HandlerInterceptor接口
 */
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
@Component
annotation class WebInterceptor(

    /**
     * 拦截路径 pattern
     */
    val include: Array<String> = [],

    /**
     * 排除路径 pattern
     */
    val exclude: Array<String> = [],

    /**
     * 优先级
     */
    val order: Int = 0,

    /**
     * 作为Bean组件的名称
     */
    @get:AliasFor("value", annotation = Component::class)
    val name: String = ""

)
